package com.xiangxg.jvm.gc;
/*
    CMS垃圾收集器
    当老年代选择CMS -XX:+UseConcMarkSweepGC 新生代会自动选择ParNew
    -verbose:gc
    -Xms20m
    -Xms20m
    -Xmn10m
    -XX:+PrintGCDetails
    -XX:+UseConcMarkSweepGC
 */
public class MyTest5 {
    public static void main(String[] args) throws Exception{
        int size = 1024 *1024;//1M
        byte[] myAlloc1 = new byte[4 *size];//2M
        System.out.println("1111");
        byte[] myAlloc2 = new byte[4 *size];//2M
        System.out.println("2222");
        byte[] myAlloc3 = new byte[4 *size];//2M
        System.out.println("3333");
        byte[] myAlloc4 = new byte[2 *size];//2M
        System.out.println("4444");
        Thread.sleep(1000);
    }
}
